<?php require_once('../../../core/import.php');?>
<?php User::Permission('SLIDE_EDIT'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <script type="text/javascript" src="../../../scripts/import.js"></script>
	<script type="text/javascript" src="scripts/edit.js"></script>
    <link rel="stylesheet" type="text/css" href="styles/edit.css"/>
</head>

<body>
	<?php
	#获取参数
	$Class=strtoupper(Functions::UrlArgs('class'));
	#获取数据
	$Data=DB::PGetRows('select * from slide where Class=? order by ID asc',array($Class));
	?>
    <form id="Form1" name="Form1" method="post" enctype="multipart/form-data" action="edit.action.php" class="Form">
    <fieldset>
    <legend>幻灯数据</legend>
    <?php
	#遍历数据
	$Collection_ID='';
    foreach($Data as $Row)
	{
		$Collection_ID=$Collection_ID.','.$Row['ID'];
	?>
        <table width="250" border="0" cellpadding="2" cellspacing="0" class="Slide_Paniel">
        <tr>
            <td width="264" height="155">               
                <img name="Slide_Picture" id="Slide_Picture_<?php echo $Row['ID']; ?>" src="<?php echo Config::PATH_RELATIVE_ATTACHMENT_TEMP.'/'.$Row['PictureFilename']; ?>" alt="<?php echo $Row['ID']; ?>" width="250" height="220" style="cursor:pointer;" />
            </td>
        </tr>
        <tr>
            <td align="center">
                <input name="Title_<?php echo $Row['ID']; ?>" type="text" class="Textbox" id="Title_<?php echo $Row['ID']; ?>" maxlength="255" style="height:22px; width:245px;" value="<?php echo $Row['Title']; ?>" title="标题"/>
            </td>
        </tr>
        <tr>
            <td align="center">
                <input name="URL_<?php echo $Row['ID']; ?>" type="text" class="Textbox" id="URL_<?php echo $Row['ID']; ?>" maxlength="255" style="height:22px; width:245px;" value="<?php echo $Row['URL']; ?>" title="网址"/>
            </td>
        </tr>
        </table>
	<?php
	}
	?>        
    </fieldset>
    <input type="hidden" name="ID" id="ID" value="<?php echo $Collection_ID; ?>" />
    <input type="hidden" name="Class" id="Class" value="<?php echo Functions::UrlArgs('class'); ?>" />
    <input id="ActionButton" name="ActionButton" type="submit" value="确定" class="button" /> 
    <input id="ResetButton" name="ResetButton" type="reset" value="重置" class="button" />
    </form>		   
</body>
</html>